<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>模板语法</title>
  <script src="./vue.js"></script>
</head>
<body>
  <div id="app">
    {{msg}}
    <p>Using mustaches: {{rawHtml}}</p>
    <p>Using mustaches:<span v-html="rawHtml"></span></p>
    <p v-html="rawHtml"></p>
    <p v-bind:class="color">this is blue</p>
    <p>{{number+1}}</p>
    <p>{{ok ? 'YES' : 'NO'}}</p>
    <p> {{ message.split('').reverse().join('') }}</p>
  </div>
  <script>
      var vm = new Vue({
        el: '#app',
        data: {
          msg: 'hello vue',
          rawHtml: 'Using mustaches:  <span style="color: red">this shoulde be red!</span>',
          color: "blue",
          number: 28,
          ok: false,
          message: "winner",
        }
      })
  </script>
  <style>
    .blue {
      color: blue;
    }
    .red {
      color: darkred;
      font-size: 100px;
    }
  </style>
</body>
</html>